package com.xiaoyi.library.service.impl;

import com.xiaoyi.library.mapper.UserMapper;
import com.xiaoyi.library.pojo.User;
import com.xiaoyi.library.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    private UserMapper userMapper;

    @Autowired
    public UserServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public boolean insertUser(User user) {
        return userMapper.insert(user);
    }
    @Override
    public boolean findByUsernameAndPassword(String user_name, String user_password) {
        return userMapper.findByUsernameAndPassword(user_name, user_password);
    }
}

